Skip to content

Keep sub-evaluators up to date after integration step #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

alexander-novo
Copy link
Collaborator

@alexander-novo alexander-novo commented May 6, 2025

Description

Evaluators which contain "children" evaluators such as systems should be given the chance to keep their sub-evaluators up to date after events like an integrator step. With the update() method, an external source can notify the evaluator when its state has been updated so that it can then go and update its children.

This is useful for callbacks, since callbacks will probably want to query individual components rather than systems.

Closes #96

Proposed changes

Add a new update() interface to Evaluator which anyone who updates an Evaluator's state manually (such as integrators) can let the Evaluator know that its state has been modified. By default, an Evaluator will choose to ignore this notice, but Systems can then update all of their children.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.

Further comments

Waiting on #91, which somewhat demonstrates more why we would want this change.

Evaluators which contain "children" evaluators such as systems should be given the chance to keep their sub-evaluators up to date after events like an integrator step. With the `update()` method, an external source can notify the evaluator when its state has been updated so that it can then go and update its children.

This is useful for callbacks, since callbacks will probably want to query individual components rather than systems.
Since other systems could be children in a system, it's important to notify them when they've been updated.
@alexander-novo alexander-novo force-pushed the update-system-children branch from 9420949 to 7ef877e Compare May 6, 2025 17:34
@pelesh pelesh deleted the branch add-ida-callbacks June 10, 2025 18:02
@pelesh pelesh closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants